﻿using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

[RequireComponent(typeof(Text))]
public class TextFont : MonoBehaviour {

    Text m_Text;
    Text text
    {
        get
        {
            if(m_Text == null)
                m_Text = GetComponent<Text>();
            
            return m_Text;
        }
    }

    // Use this for initialization
    void Start () {

        var font =  ResourceManager.LoadFont(Localization.language.ToString());
        if(font != null)
            text.font = font;
    }

    // Update is called once per frame
    void Update () {
		
	}
}
